package com.dangf.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 内容实体
 * @author Hello_海生
 * @date 2014年3月27日
 */
@Entity
@Table(name="DangF_Article")
public class Article {
	private long id;				//文章ID
	private String title;			//文章标题
	private Type typeId;			//文章分类Id
	private Date insertTime;		//发布时间
	private String source;			//来源
	private String content;			//文章内容
	private User userId;			//用户ID
	
	@Id
	@GeneratedValue
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	
	public Date getInsertTime() {
		return insertTime;
	}
	public void setInsertTime(Date insertTime) {
		this.insertTime = insertTime;
	}
	
	public String getSource() {
		return source;
	}
	public void setSource(String source) {
		this.source = source;
	}
	
	@Column(length = 16777216) 
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
	@OneToOne	
	public User getUserId() {
		return userId;
	}
	public void setUserId(User userId) {
		this.userId = userId;
	}
	
	@OneToOne
	public Type getTypeId() {
		return typeId;
	}
	public void setTypeId(Type typeId) {
		this.typeId = typeId;
	}
	
	
	
	
	
	
	
}
